package gupao.concurrency.demo.risk.exct.processor;

import gupao.concurrency.demo.risk.model.RiskJob;

import java.util.ArrayList;
import java.util.List;

public class ExctProcessor {

    private static final int TYPE_EDC = 1;
    private static final int TYPE_EDS = 2;

    public static List<Double> exctEdcEnt(RiskJob job){
        return queryEvents(TYPE_EDC);
    }

    public static List<Double> exctEdsEnt(RiskJob job){
        return queryEvents(TYPE_EDS);
    }

    private static List<Double> queryEvents(int type){
        List<Double> l = new ArrayList<>();
        int num = (type == TYPE_EDC) ? 10000 : 1000;
        for(int i = 0; i < num; i++){
            l.add(Math.random());
        }
        return l;
    }
}
